/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gunncs;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

/**
 *
 * @author anand
 */
public class BeaconSensorModel extends SensorModel{
    public static final int ID = 3;
    public static final int REDBUOY = 0;
    public static final int GREENBUOY = 1;
    public static final int FORCEFIELD = 2;
    public static final double ABSENT = 0.0;
    public static final double PRESENT = 1.0;
    public static int size = RobotModel.SIZE;
    
    public BeaconSensorModel(){
        state = new double[4];
        state[0] = 1.0;
        state[1] = 1.0;
        state[2] = 1.0;
        state[3] = 0.0;
    }
    
    public void drawAt(Graphics g, int x, int y, double theta) {
        if(state[REDBUOY] == PRESENT){
           g.setColor(Color.RED);
           g.fillArc(x, y, size, size, (int)theta+90, 90);
        }
        if(state[GREENBUOY] == PRESENT){
           g.setColor(Color.GREEN);
           g.fillArc(x, y, size, size, (int)theta+0, 90);
        }
        if(state[FORCEFIELD] == PRESENT){
           g.setColor(Color.BLUE);
           g.fillArc(x, y, size, size, (int)(theta)+75, 30);
        }else{
           g.setColor(Color.LIGHT_GRAY);
           g.fillArc(x, y, size, size, (int)(theta)+75, 30);
        }
        

    }
    
   
}
